#pragma once

#include "Globals.h"
#include "Exception.h"

#include <string>

std::string FormatNumber(int value);
std::string FormatNumber(int value, int width);
std::string FormatNumber0(int value, int width);
std::string FormatNumberHex(int value);
std::string FormatNumberHex(int value, int width);
std::string FormatNumber(unsigned value);
std::string FormatNumber(unsigned value, int width);
std::string FormatNumber0(unsigned int value, int width);
std::string FormatNumberHex(unsigned value);
std::string FormatNumberHex(unsigned value, int width);
std::string FormatNumber(long value);
std::string FormatNumber(long value, int width);
std::string FormatNumber0(long value, int width);
std::string FormatNumberHex(long value);
std::string FormatNumberHex(long value, int width);
std::string FormatNumber(unsigned long value);
std::string FormatNumber(unsigned long value, int width);
std::string FormatNumber0(unsigned long value, int width);
std::string FormatNumberHex(unsigned long value);
std::string FormatNumberHex(unsigned long value, int width);
std::string FormatNumber(int64_t value);
std::string FormatNumber(int64_t value, int width);
std::string FormatNumber0(int64_t value, int width);
std::string FormatNumberHex(int64_t value);
std::string FormatNumberHex(int64_t value, int width);
std::string FormatNumber(uint64_t value);
std::string FormatNumber(uint64_t value, int width);
std::string FormatNumber0(uint64_t value, int width);
std::string FormatNumberHex(uint64_t value);
std::string FormatNumberHex(uint64_t value, int width);
std::string FormatNumber(float value);
std::string FormatNumber(double value);
std::string FormatNumber(double value, int precision);
std::string FormatNumber(double value, int width, int precision);
std::string FormatNumber(const void* ptr);

void AppendNumber(std::string& str, int value);
void AppendNumber(std::string& str, int value, int width);
void AppendNumber0(std::string& str, int value, int width);
void AppendNumberHex(std::string& str, int value);
void AppendNumberHex(std::string& str, int value, int width);
void AppendNumber(std::string& str, unsigned value);
void AppendNumber(std::string& str, unsigned value, int width);
void AppendNumber0(std::string& str, unsigned int value, int width);
void AppendNumberHex(std::string& str, unsigned value);
void AppendNumberHex(std::string& str, unsigned value, int width);
void AppendNumber(std::string& str, long value);
void AppendNumber(std::string& str, long value, int width);
void AppendNumber0(std::string& str, long value, int width);
void AppendNumberHex(std::string& str, long value);
void AppendNumberHex(std::string& str, long value, int width);
void AppendNumber(std::string& str, unsigned long value);
void AppendNumber(std::string& str, unsigned long value, int width);
void AppendNumber0(std::string& str, unsigned long value, int width);
void AppendNumberHex(std::string& str, unsigned long value);
void AppendNumberHex(std::string& str, unsigned long value, int width);
void AppendNumber(std::string& str, int64_t value);
void AppendNumber(std::string& str, int64_t value, int width);
void AppendNumber0(std::string& str, int64_t value, int width);
void AppendNumberHex(std::string& str, int64_t value);
void AppendNumberHex(std::string& str, int64_t value, int width);
void AppendNumber(std::string& str, uint64_t value);
void AppendNumber(std::string& str, uint64_t value, int width);
void AppendNumber0(std::string& str, uint64_t value, int width);
void AppendNumberHex(std::string& str, uint64_t value);
void AppendNumberHex(std::string& str, uint64_t value, int width);
void AppendNumber(std::string& str, float value);
void AppendNumber(std::string& str, double value);
void AppendNumber(std::string& str, double value, int precision);
void AppendNumber(std::string& str, double value, int width, int precision);
void AppendNumber(std::string& str, const void* ptr);

int ParseInt(const std::string& s);
bool TryParseInt(const std::string& s, int& value);
unsigned ParseUnsignedInt(const std::string& s);
bool TryParseUnsignedInt(const std::string& s, unsigned& value);
unsigned ParseHex(const std::string& s);
bool TryParseHex(const std::string& s, unsigned& value);
int64_t ParseInt64(const std::string& s);
bool TryParseInt64(const std::string& s, int64_t& value);
uint64_t ParseUnsignedInt64(const std::string& s);
bool TryParseUnsignedInt64(const std::string& s, uint64_t& value);
uint64_t ParseHex64(const std::string& s);
bool TryParseHex64(const std::string& s, uint64_t& value);
double ParseDouble(const std::string& s);
bool TryParseDouble(const std::string& s, double& value);